
<template >
  <div>
    <modaltemplate>
      <template v-slot:changtai="slotProps">
        <!-- slotProps.menuitem 可以使用 -->
        {{ slotProps.menuitem }}
        <commonbox :itemlists="data[slotProps.menuitem]" />
      </template>
    </modaltemplate>
  </div>
</template>
<script lang="ts">
import modaltemplate from '@/components/puTuoModal.vue'
import commonbox from '@/components/commonbox.vue'
import { reactive } from 'vue-demi';
export default {
  name: 'modaltest',
  components: {
    modaltemplate,
    commonbox
  },
  props: {
    menuitem: Array,
  },
  setup(props) {
    let data = {
      chengshizhisheng: [{title: '12345',items: [{ item: '今日', value: '48', unit: '起' },{ item: '本周', value: '257', unit: '起' },]},
        {title: '119报警总数',items: [{ item: '今日', value: '3', unit: '起' },]},
        {title: '119火警类',items: [{ item: '今日', value: '0', unit: '起' },]},
        {title: '119抢险救援',items: [{ item: '今日', value: '2', unit: '起' },]},
        {title: '119社会救助',items: [{ item: '今日', value: '1', unit: '起' },]},
        {title: '110报警总数',items: [{ item: '今日', value: '469', unit: '起' },]},
        {title: '110报警类',items: [{ item: '今日', value: '80', unit: '起' },]},
        {title: '110侵权',items: [{ item: '今日', value: '29', unit: '起' },]},
        {title: '110纠纷',items: [{ item: '今日', value: '21', unit: '起' },]},
        {title: '110侵财',items: [{ item: '今日', value: '19', unit: '起' },]},
        {title: '110其他',items: [{ item: '今日', value: '11', unit: '起' },]},
        {title: '110非报警类',items: [{ item: '今日', value: '389', unit: '起' },]},
        {title: '110诈骗',items: [{ item: '今日', value: '84', unit: '起' },]},
        {title: '110交通事故',items: [{ item: '今日', value: '168', unit: '起' },]},
        {title: '110其他',items: [{ item: '今日', value: '65', unit: '起' },]},
        {title: '应急突发事件',items: [{ item: '今日', value: '12', unit: '起' },{ item: '本周', value: '68', unit: '起' },]},
      ],
      chengshizhigan: [
        {title: '智能门闸',items: [{ item: '安装', value: '196', unit: '个' },{ item: '告警', value: '257', unit: '个' },]},
        {title: '门禁设备',items: [{ item: '安装', value: '4010', unit: '个' },{ item: '告警', value: '0', unit: '个' },]},
        {title: '有线摄像机',items: [{ item: '安装', value: '421', unit: '个' },{ item: '告警', value: '0', unit: '个' },]},
        {title: '执法电瓶车',items: [{ item: '安装', value: '158', unit: '个' },{ item: '告警', value: '0', unit: '个' },]},
        {title: 'GPS单兵仪',items: [{ item: '安装', value: '50', unit: '个' },{ item: '告警', value: '0', unit: '个' },]},
        {title: '垃圾称重传感器',items: [{ item: '安装', value: '1', unit: '个' },{ item: '告警', value: '0', unit: '个' },]},
        {title: '便民服务仪',items: [{ item: '安装', value: '91', unit: '个' },{ item: '告警', value: '0', unit: '个' },]},
        {title: '火灾烟雾探测传感器',items: [{ item: '安装', value: '38941', unit: '个' },{ item: '告警', value: '121', unit: '个' },]},
        {title: '水质（溶解氧）传感器',items: [{ item: '安装', value: '51', unit: '个' },{ item: '告警', value: '0', unit: '个' },]},
        {title: '人脸门禁机',items: [{ item: '安装', value: '12', unit: '个' },{ item: '告警', value: '0', unit: '个' },]},
        {title: '水质（PH）传感器',items: [{ item: '安装', value: '21', unit: '个' },{ item: '告警', value: '0', unit: '个' },]},
        {title: '温湿度传感器',items: [{ item: '安装', value: '2', unit: '个' },{ item: '告警', value: '0', unit: '个' },]},
        {title: '倾角传感器(gsm版)',items: [{ item: '安装', value: '90', unit: '个' },{ item: '告警', value: '0', unit: '个' },]},
        {title: '车辆地磁探测传感器',items: [{ item: '安装', value: '2895', unit: '个' },{ item: '告警', value: '208', unit: '个' },]},
        {title: '温度检测传感器',items: [{ item: '安装', value: '5', unit: '个' },{ item: '告警', value: '0', unit: '个' },]},
        {title: '电梯加速度探测传感器',items: [{ item: '安装', value: '353', unit: '个' },{ item: '告警', value: '0', unit: '个' },]},
        {title: '电弧灭弧探测传感器',items: [{ item: '安装', value: '1259', unit: '个' },{ item: '告警', value: '0', unit: '个' },]},
        {title: '手动火灾报警按钮',items: [{ item: '安装', value: '18067', unit: '个' },{ item: '告警', value: '0', unit: '个' },]},
        {title: '水浸探测传感器',items: [{ item: '安装', value: '344', unit: '个' },{ item: '告警', value: '17', unit: '个' },]},
        {title: '震动探测传感器',items: [{ item: '安装', value: '36', unit: '个' },{ item: '告警', value: '0', unit: '个' },]},
        {title: '门体状态探测传感器(gsm版)',items: [{ item: '安装', value: '218', unit: '个' },{ item: '告警', value: '2', unit: '个' },]},
        {title: '电梯门体状态探测传感器',items: [{ item: '安装', value: '69', unit: '个' },{ item: '告警', value: '0', unit: '个' },]},
        {title: '人体活动探测传感器',items: [{ item: '安装', value: '3120', unit: '个' },{ item: '告警', value: '2', unit: '个' },]},
        {title: '无线智能摄像机',items: [{ item: '安装', value: '159', unit: '个' },{ item: '告警', value: '0', unit: '个' },]},
        {title: '床垫传感器',items: [{ item: '安装', value: '1', unit: '个' },{ item: '告警', value: '0', unit: '个' },]},
        {title: '睡眠仪',items: [{ item: '安装', value: '423', unit: '个' },{ item: '告警', value: '0', unit: '个' },]},
        {title: '门体状态探测传感器',items: [{ item: '安装', value: '13999', unit: '个' },{ item: '告警', value: '1336', unit: '个' },]},
        {title: '可燃气体探测传感器',items: [{ item: '安装', value: '2745', unit: '个' },{ item: '告警', value: '13', unit: '个' },]},
        {title: '红外对射传感器',items: [{ item: '安装', value: '339', unit: '个' },{ item: '告警', value: '3', unit: '个' },]},
        {title: '倾角传感器',items: [{ item: '安装', value: '246', unit: '个' },{ item: '告警', value: '0', unit: '个' },]},
        {title: '血压计',items: [{ item: '安装', value: '219', unit: '个' },{ item: '告警', value: '0', unit: '个' },]},
        {title: '垃圾满溢探测传感器',items: [{ item: '安装', value: '6347', unit: '个' },{ item: '告警', value: '0', unit: '个' },]},
        {title: '执法记录仪',items: [{ item: '安装', value: '78', unit: '个' },{ item: '告警', value: '0', unit: '个' },]},
        {title: '微信开门',items: [{ item: '安装', value: '681', unit: '个' },{ item: '告警', value: '0', unit: '个' },]},
        {title: '垃圾车GPS',items: [{ item: '安装', value: '13', unit: '个' },{ item: '告警', value: '0', unit: '个' },]},
        {title: '井盖监控传感器',items: [{ item: '安装', value: '607', unit: '个' },{ item: '告警', value: '0', unit: '个' },]},
        {title: '普通监控摄像机',items: [{ item: '安装', value: '889', unit: '个' },{ item: '告警', value: '0', unit: '个' },]},
        {title: '人脸识别摄像机',items: [{ item: '安装', value: '27', unit: '个' },{ item: '告警', value: '0', unit: '个' },]},
        {title: '室内水压探测传感器',items: [{ item: '安装', value: '1128', unit: '个' },{ item: '告警', value: '60', unit: '个' },]},
      ],

      chengshizhiyan:[
        {title: '公安',items: [{ item: '安装', value: '5850', unit: '台' },]},
        {title: '智能安防',items: [{ item: '安装', value: '8720', unit: '台' },]},
        {title: '城运',items: [{ item: '安装', value: '1506', unit: '台' },]},
        {title: '鹰眼',items: [{ item: '安装', value: '6', unit: '台' },]},
        {title: '高空摄像头',items: [{ item: '安装', value: '28', unit: '台' },]},
        {title: 'AR高空摄像头',items: [{ item: '安装', value: '6', unit: '台' },]},
      ],

      chengshihuxi:[
        {title: '空气质量指数',items: [{ item: '', value: '46', unit: '' },]},
        {title: 'PM2.5',items: [{ item: '', value: '11', unit: '' },]},
        {title: 'PM10',items: [{ item: '', value: '26', unit: '' },]},
        {title: '区域降尘指数',items: [{ item: '', value: '4.09', unit: '吨/平方公里' },]},
        {title: '干垃圾末端处理',items: [{ item: '', value: '739.6', unit: '吨' },]},
        {title: '湿垃圾末端处理',items: [{ item: '', value: '312.1', unit: '吨' },]},
        {title: '可回收物收集',items: [{ item: '', value: '189.4', unit: '吨' },]},
        {title: '有害垃圾收集',items: [{ item: '', value: '0.22', unit: '吨' },]},
        {title: '温度',items: [{ item: '', value: '16~23', unit: '℃' },]},
        {title: '天气情况',items: [{ item: '', value: '多云', unit: '' },]},
        {title: '暴雨情况',items: [{ item: '', value: '正常', unit: '' },]},
        {title: '台风情况',items: [{ item: '', value: '正常', unit: '' },]},
        {title: '高潮情况',items: [{ item: '', value: '正常', unit: '' },]},
        {title: '洪水情况',items: [{ item: '', value: '正常', unit: '' },]},
      ],

      chengshiweidu:[
        {title: '鸡蛋价格',items: [{ item: '', value: '4.56', unit: '元/500g' },]},
        {title: '猪肉价格',items: [{ item: '', value: '26,78', unit: '元/500g' },]},
        {title: '蔬菜价格',items: [{ item: '', value: '4.84', unit: '元/500g' },]},
        {title: '水果价格',items: [{ item: '', value: '4.48', unit: '元/500g' },]},
        {title: '水产品价格',items: [{ item: '', value: '20.92', unit: '元/500g' },]},
        {title: '一网通办-接待总数',items: [{ item: '', value: '602', unit: '人' },]},
        {title: '一网通办-办理总数',items: [{ item: '', value: '603', unit: '件' },]},
      ],

      chengshimaibo:[
        {title: '地面拥堵指数',items: [{ item: '', value: '38.2', unit: '' },]},
        {title: '快速道路最拥堵路段',items: [{ item: '', value: '北翟路上匝道', unit: '' },]},
        {title: '地面道路最拥堵路段',items: [{ item: '', value: '兰溪路至武宁路', unit: '' },]},
        {title: '剩余泊位占比',items: [{ item: '', value: '33.70', unit: '%' },]},
        {title: '道路停车剩余数',items: [{ item: '', value: '16174', unit: '个' },]},
        {title: '场库停车剩余数',items: [{ item: '', value: '1852', unit: '个' },]},
        {title: '轨交客流',items: [{ item: '进站：', value: '20', unit: '万人' },{ item: '出站：', value: '17.3', unit: '万人' },]},
        {title: '轨交进出站客流TOP1',items: [{ item: '', value: '大渡河路', unit: '' },]},
        {title: '轨交站内换乘客流TOP1',items: [{ item: '', value: '曹杨路', unit: '' },]},
        {title: '105路公交当前客流',items: [{ item: '', value: '172', unit: '人' },]},
        {title: '单车在线车辆',items: [{ item: '', value: '2.9', unit: '万辆' },]},
        {title: '区内低活跃度单车数量',items: [{ item: '', value: '1.1', unit: '万辆' },]},
      ],
    };

    const fromsData: any = [
    ]

    return {
      data: reactive(data)
    }
  }
}
</script>
<style lang="less" scoped>
.test2 {
  color: red;
}
</style>